import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Country from '../views/Country'
import Place from '../views/Place'
import Category from '../views/Category'
import Discount from '../views/Discount'

Vue.use(VueRouter);

const routes = [
    {
        path: '/home',
        name: 'home',
        component: Home
    },
    {
        path: '/',
        name: 'home',
        redirect:'/home',
    },
    {
        path: '/country/:pk',
        name: 'country',
        component: Country
    },
    {
        path: '/place/:pk',
        name: 'place',
        component: Place
    },
     {
        path: '/category/:pk',
        name: 'category',
        component: Category
    },
    {
        path: '/discount',
        name: 'discount',
        component: Discount
    },


];

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
});

export default router
